<div class="header">
    <div class="wrap clearfix topmenu">

        <script src="/static/lib/layer/layer.js"></script>
        <span class="l" style="width:550px;">
            {if session('vol_user.id')} 欢迎您：&nbsp;&nbsp;  {:session('vol_user.name')} <a href="javascript:void(0)" onclick="LoginOut()">&nbsp;&nbsp;退出</a> {else/}
            <a href="{:url('index/index/login')}" style="color:red">亲，请登录</a>&nbsp;
        <a href="{:url('index/index/register')}">志愿者注册</a>
{/if}
    </span>

        <span class="r topmenu_r">
        <div class="topmenu_txt">

    </div>
        <div class="topmenu_txt">

        <div class="topmenu_con">

        </div>
    </div>
        <div class="topmenu_txt">
    </div>
                <script>
    $(function(){



    });
</script>            <div class="topmenu_txt">
            </div>
        </span>

    </div>
</div>

<div class="header_logo">
    <div class="wrap clearfix">
        <a href="#/" class="l logo"></a>

    </div>
</div>
<div class="nav">
    <div class="wrap" id="vol_nav">
        <a href="{:url('index/index/index')}" style="width:71px;">首页</a>
        <a href="{:url('index/project/index')}">志愿项目</a>
        <a href="{:url('index/guide/index')}">网站指南</a>
<!--        <a href="{:url('index/user/userInfoEdit')}">修改个人资料</a>-->
<!--        <a href="{:url('index/user/wait')}">待审核项目</a>-->
<!--        <a href="{:url('index/user/allow')}">通过项目</a>-->
        <a href="{:url('index/article/index')}">志愿风采</a>
        <a href="{:url('index/download/index')}">下载中心</a>
        <a href="{:url('index/user/my_index')}">用户中心</a>
    </div>
</div>

<script>
    function LoginOut(){
        $.ajax({
            url:"{:url('index/index/loginOut')}",
            type:"post",
            data:$('form').serialize(),
            dataType:'json',
            success:function(data) {
                if(data.code == 1)
                {
                    layer.msg(data.msg,{
                        icon:6,
                        time:2000
                    },function () {
                        location.href = data.url;
                    })
                }else
                {
                    layer.open(
                        {
                            title:'失败！',
                            content:data.msg,
                            icon:5,
                            anim:6
                        }
                    );
                }
            }
        });
    }
</script>
